#统计字符串
sentence = input("请输入字符串")
letters = 0
space = 0
digit = 0
other = 0
for i in sentence:
        if i.isalpha():
            letters += 1
        elif i.isspace():
            space += 1
        elif i.isdigit():
            digit += 1
        else:
            other += 1
print('字母=%d,空格=%d,数字=%d,其它=%d'%(letters,space,digit,other))









#票数统计

student = {"小崔": 0,"小徐": 0,"小李": 0,"小文": 0}
count = 0
while count < 5:
    name = input("请选择你心目中的人选：")
    if name == "小崔":
        student["小崔"] += 1
    elif name == "小徐":
        student["小徐"] += 1
    elif name == "小李":
        student["小李"] += 1
    elif name == "小文":
        student["小文"] += 1
    count += 1
print("最终结果：")
for key, value in student.items():
    print("{}得到{}票 ".format(key,value))
    if value == max(student.values()):
        winner = key
print("{}为班长".format(winner))